package com.oocl.util.ipml;

import java.util.ArrayList;
import java.util.List;

import com.oocl.modle.Customer;
import com.oocl.modle.Message;
import com.oocl.util.Valid;

public class Validtor implements Valid{


	
	public boolean validId(String info) {
		if(info.matches("\\d+")){
			return true;
		}else{
			return false;
		}
	}

	public boolean validName(String info) {
		if(info.matches("[a-zA-Z]+")){
			return true;
		}else{
			return false;
		}
		
	}

	public boolean validBirth(String info) {
		if(info.matches("^\\d{4}-\\d{2}-\\d{2}")){
			return true;
		}else{
			return false;
		}
		
	}

	public boolean validSex(String info) {
		if(info.matches("true") || info.matches("false")){
			return true;
		}else{
			return false;
		}
	}

	public boolean validEmail(String info) {
		if(info.matches("^\\w+@\\w+\\.com$")){
			return true;
		}else{
			return false;
		}
		
	}

	

}
